<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <include file="Public/meta" />
    <link rel="stylesheet" href="__ADMIN_JS__/iCheck-1.0.2/skins/all.css">
    <style type="text/css">
        .nav>li>a {
            padding: 0px;
            height: 40px;
            line-height: 40px;
        }
        .nav>li {
            width: 80px;
        }
        .navs{
            margin-top: 10px;
        }
        .file-box{  
            display: inline-block;  
            position: relative;  
            padding:8px;  
            overflow: hidden;  
            color:#fff;  
            background-color: #337ab7;  
            text-align: center;
            outline: none;
            border-radius: 3px;
        }  
        .file-btn{  
            position: absolute;  
            width: 100%;  
            height: 100%;  
            top: 0;  
            left: 0;  
            outline: none;  
            background-color: #337ab7;  
            filter:alpha(opacity=0);  
            -moz-opacity:0;  
            -khtml-opacity: 0;  
            opacity: 0;  
            text-align: center;
        }  
    </style>
</head>
<body>
    <div class="info-center">
        <div class="page-header">
            <div class="pull-left">
                <h4>添加会员</h4>   
                <a href="javascript:history.go(-1)">
                    <button class="btn btn-default"><i class="fa fa-level-up"></i>返回</button>
                </a>   
                <div>
                    <ul class="nav nav-pills nav-justified navs">
                        <li role="presentation"><a href="{:U('user/add')}">个人</a></li>
                        <li role="presentation" class="active"><a href="{:U('user/addc')}">企业</a></li>
                    </ul>
                </div>
                
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="table-margin">
            <form action="{:U('user/addc')}" class="form-horizontal" method="post">
                <table class="table table-hover contact-template-form">
                    <tbody>
                        <tr>
                            <td width="20%" align="right"></font>会员用户名：</td>
                            <td>
                                <input class="form-control w-300" type="text"  placeholder="请输入会员用户名" name="username" id="username">
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">申请单位中文名称：</td>
                            <td>
                                <input class="form-control w-300" type="text" placeholder="申请单位中文名称" name="comname" id="comname">
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">联系人(真实姓名)：</td>
                            <td>
                                <input class="form-control w-300" type="text" placeholder="请输入联系人(真实姓名)" name="truename" id="truename">
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">手机号码：</td>
                            <td>
                                <input class="form-control w-300" type="text" placeholder="请输入手机号码" name="phone">
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">电子邮件：</td>
                            <td>
                                <input class="form-control w-300" type="text" placeholder="请输入电子邮件" name="email">
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">用户密码：</td>
                            <td>
                                <input class="form-control w-300" type="text" placeholder="请输入用户密码" name="password">
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right">确认密码：</td>
                            <td>
                                <input class="form-control w-300" type="text" placeholder="请确认密码" name="repassword">
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <input class="btn btn-primary login-btn" type="submit" value="添加">
                            </td>
                        </tr>
                    </tbody>
                </table>    
            </form>
        </div>
    </div>  
    <script type="text/javascript" src="__ADMIN_JS__/common.js"></script>
    <script type="text/javascript" src="__ADMIN_JS__/iCheck-1.0.2/icheck.js"></script>
    <script type="text/javascript">

    $(document).ready(function(){
        $(".login-btn").click(function(){
            var username = $("#username").val();
            if(!(/^[a-zA-Z0-9_]{3,20}$/.test(username))){
                alert("会员用户名为3-20为字母、数字、下划线组成");
                return false;
            }
            var comname = $("#comname").val();
            if(!(/^[\u4e00-\u9fa5]+$/.test(comname))){
                alert("中文单位名称格式错误,不能含有特殊字符");
                return false;
            }
            var truename = $("#truename").val();
            if(!(/^[\u4e00-\u9fa5]+$/.test(truename))){
                alert("真实姓名格式错误,必须含有汉字");
                return false;
            }
        })
        $('.xb-icheck').iCheck({
            checkboxClass: "icheckbox_minimal-blue",
            radioClass: "iradio_minimal-blue",
            increaseArea: "20%"
        });
    });
    </script>
</body>
</html>
